package com.aaa.daemon;

import org.springframework.boot.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.concurrent.CountDownLatch;

/**
 * Windows服务安装入口类
 *
 * @author mason
 */
public class DaemonMainClassForWindows {

    static ConfigurableApplicationContext applicationContext;

    public static void start(String[] args) {
        applicationContext = SpringApplication.run(CommonsDaemonExampleApplication.class, args);
    }

    public static void stop(String[] args) {
        applicationContext.close();
        System.exit(0);
    }
}